package com.guochenglang.www.dao;

import com.guochenglang.www.pojo.ReplyMessage;

import java.sql.SQLException;
import java.util.ArrayList;

/**
 * @author GuoChenglang
 */
public interface ReplyMessageDao {
    /**
     * 搜索回复消息列表
     *
     * @param conditions 搜索条件
     * @return 回复消息列表
     * @throws SQLException sql异常
     * @throws InterruptedException 断点异常
     * @throws IllegalAccessException 非法访问异常
     * @throws InstantiationException 实现异常
     */
    ArrayList<ReplyMessage> replyMessageSelect(ReplyMessage conditions) throws SQLException, InterruptedException, IllegalAccessException, InstantiationException;

    /**
     * 添加回复消息
     *
     * @param comfort 添加信息
     * @return 添加的主键
     * @throws SQLException sql异常
     * @throws InterruptedException 断点异常
     * @throws IllegalAccessException 非法访问异常
     */
    int insertReplyMessage(ReplyMessage comfort) throws SQLException, InterruptedException, IllegalAccessException;

    /**
     * 删除回复消息
     *
     * @param conditions 删除条件
     * @return 删除行数
     * @throws SQLException sql异常
     * @throws InterruptedException 断点异常
     * @throws IllegalAccessException 非法访问异常
     */
    int deleteReplyMessage(ReplyMessage conditions) throws SQLException, InterruptedException, IllegalAccessException;

    /**
     * 更新回复消息
     *
     * @param set 更新的数据
     * @param conditions 更新的条件
     * @return 更新的行数
     * @throws SQLException sql异常
     * @throws InterruptedException 断点异常
     * @throws IllegalAccessException 非法访问异常
     */
    int updateReplyMessage(ReplyMessage set, ReplyMessage conditions) throws SQLException, InterruptedException, IllegalAccessException;
}
